package User;

import book.bookList;
import operation.*;
import org.w3c.dom.ls.LSOutput;

import java.util.Scanner;

public class nomalUser extends User{
    public nomalUser(String name) {
        super(name);
        operation=new Listoperation[]{new exitoperation()
                ,new FIndoperation(),
                new Borrowoperation(),
                new returnoperation()};
    }
    public int menu(){
        System.out.println("欢迎"+name+"来到图书管理系统");
        System.out.println("1.查找图书");
        System.out.println("2.借阅图书");
        System.out.println("3.归还图书");
        System.out.println("0,退出系统");
        Scanner scanner =new Scanner(System.in);
        System.out.println("请输入你的操作:");
        int x=scanner.nextInt();
        return x;
    }

    @Override
    public void dooperation(int choice, bookList booklist) {
        operation[choice].work(booklist);
    }
}
